additional support for ms2rescore refactoring #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant performance improvements and new feature extraction capabilities to the
ms2rescore-rsRust crate. The main focus is on adding parallel processing for spectrum parsing and feature computation, integrating new dependencies, and exposing new feature extraction functions to Python via PyO3.Performance improvements (parallelization):
rayoncrate.New feature extraction and API enhancements:
ms2_featureswith ams2_features_from_ms2spectrafunction, which computes a variety of spectrum annotation and matching features (such as explained intensity, b/y ion coverage, and hyperscore) in parallel, and exposes it as a Python-callable function.ms2pip_featureswith ams2pip_features_from_prediction_peak_arraysfunction, which computes all ms2pip features required for ms2rescore in parallel, and exposes it as a Python-callable function.ms2_features_from_ms2spectraandms2pip_features_from_prediction_peak_arraysas Python functions in the module initialization.Python interoperability improvements:
MS2SpectrumandPrecursorclass with a#[pyclass(module = "ms2rescore_rs", get_all, set_all)]decorator, a Python-compatible constructor, and a__reduce__method for better compatibility with Python serialization (e.g., pickling). This is required for multiprocessing with MS²Rescore.Package management:
0.4.3to0.5.0to reflect the new features and breaking changes.rayon,rustyms,ordered-float, andnumpyinCargo.toml.